package com.ecloud.gardensterminal.controller.dto;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Squbi
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GardensMqttSwitchDto {
    private Integer deviceId;
    private Integer operation;

    public GardensMqttSwitchDto(String json) {
        GardensMqttSwitchDto dto = JSON.parseObject(json, this.getClass());
        this.deviceId = dto.getDeviceId();
        this.operation = dto.getOperation();
    }
}
